package com.linys.scala.qf.day03

/**
  * 伴生对象互相访问
  */
class CompanionObject {
  var id = 0
  private val name = "tingjie"
  def printContent :Unit = {
    println(name + CompanionObject.content)
  }
}

object CompanionObject {
  private val content = "hello!"

  def main(args: Array[String]): Unit = {
    val co = new CompanionObject
    co.id = 10
    println(co.id)
    println(co.name)
    co.printContent

    val arr = Array(1,2,3,4)

  }

}